<script setup>
import {useRouter} from "vue-router";
import {toHandlerKey} from "vue";
const router=useRouter()
const toDemo=()=>{
  router.push({
    path:'/demo',
    // 参数
    query:{
      id:999
    }
  })
}
const toHello=()=>{
router.push(
    {name:'hello',
    query:{
      id:999
    }
    })
}
</script>
<template>
 <div id="d1">
   <div  id="d2">
     <RouterLink to="/demo">去demo</RouterLink>
     <el-button type="warning" round size="large">demo</el-button>
     <br>
     <RouterLink to="/hello">去hello</RouterLink>
     <br>
     <button @click="toDemo">去demo</button>

     <br>
     <button @click="toHello">去hello</button>
     <el-button type="success">去hello</el-button>
     <el-button type="success" size="large">去hello</el-button>
   </div>
   <div id="d3">
     <RouterView/>
   </div>

 </div>

</template>

<style scoped>
#d1{
  display: flex;
}
#d2{
  width: 20%;
}
</style>
<!--第二行注释-->
<!--app注释-->
<!--第三行注释-->
<!--66666666-->
<!--6995959-->
<!--我是写了代码，master分支能看我吗-->